import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.text.DecimalFormat;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;


public class InfoDisplay extends JFrame {

	private JPanel contentPane;

	/**
	 * Create the frame.
	 * @param user Instance of the user class
	 * @param members Array of the party members
	 * @param w Instance of the wagon
	 * @param eq User's equipment class
	 */
	public InfoDisplay(PartyLeader user, PartyMember[] members, Wagon w, Equipment eq) {
		DecimalFormat df = new DecimalFormat("$#,###,##0.00");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 800, 600);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Player Name: " + user.getPlayerName());
		lblNewLabel.setBounds(31, 101, 201, 14);
		contentPane.add(lblNewLabel);
		
		JLabel lblNewLabel_1 = new JLabel("Party Members:");
		lblNewLabel_1.setBounds(31, 139, 201, 14);
		contentPane.add(lblNewLabel_1);
		
		JLabel lblNewLabel_2 = new JLabel(members[0].getName());
		lblNewLabel_2.setBounds(59, 174, 223, 14);
		contentPane.add(lblNewLabel_2);
		
		JLabel lblNewLabel_3 = new JLabel(members[1].getName());
		lblNewLabel_3.setBounds(59, 211, 223, 14);
		contentPane.add(lblNewLabel_3);
		
		JLabel lblNewLabel_4 = new JLabel(members[2].getName());
		lblNewLabel_4.setBounds(59, 245, 223, 14);
		contentPane.add(lblNewLabel_4);
		
		JLabel lblNewLabel_5 = new JLabel(members[3].getName());
		lblNewLabel_5.setBounds(59, 283, 223, 14);
		contentPane.add(lblNewLabel_5);
		
		JLabel lblNewLabel_6 = new JLabel("Money");
		lblNewLabel_6.setBounds(308, 101, 46, 14);
		contentPane.add(lblNewLabel_6);
		
		JLabel lblNewLabel_7 = new JLabel("Profession");
		lblNewLabel_7.setBounds(456, 101, 46, 14);
		contentPane.add(lblNewLabel_7);
		
		JLabel lblNewLabel_8 = new JLabel(df.format((user.getMoney() / 100.0)));
		lblNewLabel_8.setBounds(308, 139, 138, 14);
		contentPane.add(lblNewLabel_8);
		
		JLabel lblNewLabel_9 = new JLabel(user.getPlayerProf().toString());
		lblNewLabel_9.setBounds(456, 139, 72, 14);
		contentPane.add(lblNewLabel_9);
		
		JLabel lblNewLabel_10 = new JLabel("Items");
		lblNewLabel_10.setBounds(59, 356, 46, 14);
		contentPane.add(lblNewLabel_10);
		
		JLabel lblNewLabel_11 = new JLabel(Equipment.Item_List[0] + " x" + (eq.getQuantities())[0]);
		lblNewLabel_11.setBounds(59, 399, 93, 14);
		contentPane.add(lblNewLabel_11);
		
		JLabel lblNewLabel_12 = new JLabel(Equipment.Item_List[1] + " x" + (eq.getQuantities())[1]);
		lblNewLabel_12.setBounds(208, 399, 185, 14);
		contentPane.add(lblNewLabel_12);
		
		JLabel lblNewLabel_13 = new JLabel(Equipment.Item_List[2] + " x" + (eq.getQuantities())[2]);
		lblNewLabel_13.setBounds(403, 399, 173, 14);
		contentPane.add(lblNewLabel_13);
		
		JLabel lblNewLabel_14 = new JLabel(Equipment.Item_List[3] + " x" + (eq.getQuantities())[3]);
		lblNewLabel_14.setBounds(605, 399, 169, 14);
		contentPane.add(lblNewLabel_14);
		
		JLabel lblNewLabel_15 = new JLabel(Equipment.Item_List[4] + " x" + (eq.getQuantities())[4]);
		lblNewLabel_15.setBounds(59, 442, 139, 14);
		contentPane.add(lblNewLabel_15);
		
		JLabel lblNewLabel_16 = new JLabel(Equipment.Item_List[5] + " x" + (eq.getQuantities())[5]);
		lblNewLabel_16.setBounds(208, 442, 173, 14);
		contentPane.add(lblNewLabel_16);
		
		JLabel lblNewLabel_17 = new JLabel(Equipment.Item_List[6] + " x" + (eq.getQuantities())[6]);
		lblNewLabel_17.setBounds(403, 442, 173, 14);
		contentPane.add(lblNewLabel_17);
		
		JLabel lblPace = new JLabel("Pace");
		lblPace.setBounds(568, 101, 46, 14);
		contentPane.add(lblPace);
		
		JLabel lblRation = new JLabel("Ration");
		lblRation.setBounds(687, 101, 46, 14);
		contentPane.add(lblRation);
		
		JLabel lblNewLabel_18 = new JLabel(Wagon.paceSelection[w.getPace()]);
		lblNewLabel_18.setBounds(568, 139, 96, 14);
		contentPane.add(lblNewLabel_18);
		
		JLabel lblNewLabel_19 = new JLabel(Wagon.rationSelection[w.getRations()]);
		lblNewLabel_19.setBounds(687, 139, 87, 14);
		contentPane.add(lblNewLabel_19);
	}

}
